using System;
using Microsoft.Practices.ObjectBuilder;
using Microsoft.Practices.CompositeUI;
using Jbe.TestSuite.Infrastructure.Interface;

namespace Jbe.TestSuite.LogViewer
{
    public class LogViewPresenter : Presenter<ILogView>
    {
        public bool RecorderEnabled
        {
            get { return LogRecorder.Enabled; }
            set { LogRecorder.Enabled = value; }
        }

        /// <summary>
        /// This method is a placeholder that will be called by the view when it's been loaded <see cref="System.Winforms.Control.OnLoad"/>
        /// </summary>
        public override void OnViewReady()
        {
            base.OnViewReady();
        }

        /// <summary>
        /// Close the view
        /// </summary>
        public void OnCloseView()
        {
            base.CloseView();
        }

        public void Clear()
        {
            LogRecorder.Clear();
        }
    }
}

